home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_findutils.idb / usr / freeware / catman / u_man / cat5 / locatedb.Z / locatedb
Encoding:
Text File  |  1998-05-21  |  6.5 KB  |  200 lines

  1. /xlv1/freeware/1998.May/findutils/4.1/findutils-4.1.diffbuild/locate
  2.  
  3.  
  4.  
  5.      LLLLOOOOCCCCAAAATTTTEEEEDDDDBBBB((((5555LLLL))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          LLLLOOOOCCCCAAAATTTTEEEEDDDDBBBB((((5555LLLL))))
  6.  
  7.  
  8.  
  9.      NNNNAAAAMMMMEEEE
  10.       locatedb - front-compressed file name    database
  11.  
  12.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  13.       This manual page documents the format    of file    name databases
  14.       for the GNU version of llllooooccccaaaatttteeee.  The file name    databases
  15.       contain lists    of files that were in particular directory
  16.       trees    when the databases were    last updated.
  17.  
  18.       There    can be multiple    databases.  Users can select which
  19.       databases llllooooccccaaaatttteeee searches using an environment variable or
  20.       command line option; see llllooooccccaaaatttteeee(1L).    The system
  21.       administrator    can choose the file name of the    default
  22.       database, the    frequency with which the databases are
  23.       updated, and the directories for which they contain entries.
  24.       Normally, file name databases    are updated by running the
  25.       uuuuppppddddaaaatttteeeeddddbbbb program periodically, typically nightly; see
  26.       uuuuppppddddaaaatttteeeeddddbbbb(1L).
  27.  
  28.       uuuuppppddddaaaatttteeeeddddbbbb runs    a program called ffffrrrrccccooooddddeeee    to compress the    list
  29.       of file names    using front-compression, which reduces the
  30.       database size    by a factor of 4 to 5.    Front-compression
  31.       (also    known as incremental encoding) works as    follows.
  32.  
  33.       The database entries are a sorted list (case-insensitively,
  34.       for users' convenience).  Since the list is sorted, each
  35.       entry    is likely to share a prefix (initial string) with the
  36.       previous entry.  Each    database entry begins with an offset-
  37.       differential count byte, which is the    additional number of
  38.       characters of    prefix of the preceding    entry to use beyond
  39.       the number that the preceding    entry is using of its
  40.       predecessor.    (The counts can    be negative.)  Following the
  41.       count    is a null-terminated ASCII remainder - the part    of the
  42.       name that follows the    shared prefix.
  43.  
  44.       If the offset-differential count is larger than can be
  45.       stored in a byte (+/-127), the byte has the value 0x80 and
  46.       the count follows in a 2-byte    word, with the high byte first
  47.       (network byte    order).
  48.  
  49.       Every    database begins    with a dummy entry for a file called
  50.       `LOCATE02', which llllooooccccaaaatttteeee checks for to ensure    that the
  51.       database file    has the    correct    format;    it ignores the entry
  52.       in doing the search.
  53.  
  54.       Databases can    not be concatenated together, even if the
  55.       first    (dummy)    entry is trimmed from all but the first
  56.       database.  This is because the offset-differential count in
  57.       the first entry of the second    and following databases    will
  58.       be wrong.
  59.  
  60.       There    is also    an old database    format,    used by    Unix llllooooccccaaaatttteeee
  61.  
  62.  
  63.  
  64.      Page 1                         (printed 5/18/98)
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.      LLLLOOOOCCCCAAAATTTTEEEEDDDDBBBB((((5555LLLL))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          LLLLOOOOCCCCAAAATTTTEEEEDDDDBBBB((((5555LLLL))))
  72.  
  73.  
  74.  
  75.       and ffffiiiinnnndddd programs and    earlier    releases of the    GNU ones.
  76.       uuuuppppddddaaaatttteeeeddddbbbb runs    programs called    bbbbiiiiggggrrrraaaammmm and ccccooooddddeeee    to produce
  77.       old-format databases.     The old format    differs    from the above
  78.       description in the following ways.  Instead of each entry
  79.       starting with    an offset-differential count byte and ending
  80.       with a null, byte values from    0 through 28 indicate offset-
  81.       differential counts from -14 through 14.  The    byte value
  82.       indicating that a long offset-differential count follows is
  83.       0x1e (30), not 0x80.    The long counts    are stored in host
  84.       byte order, which is not necessarily network byte order, and
  85.       host integer word size, which    is usually 4 bytes.  They also
  86.       represent a count 14 less than their value.  The database
  87.       lines    have no    termination byte; the start of the next    line
  88.       is indicated by its first byte having    a value    <= 30.
  89.  
  90.       In addition, instead of starting with    a dummy    entry, the old
  91.       database format starts with a    256 byte table containing the
  92.       128 most common bigrams in the file list.  A bigram is a
  93.       pair of adjacent bytes.  Bytes in the    database that have the
  94.       high bit set are indexes (with the high bit cleared) into
  95.       the bigram table.  The bigram    and offset-differential    count
  96.       coding makes these databases 20-25% smaller than the new
  97.       format, but makes them not 8-bit clean.  Any byte in a file
  98.       name that is in the ranges used for the special codes    is
  99.       replaced in the database by a    question mark, which not
  100.       coincidentally is the    shell wildcard to match    a single
  101.       character.
  102.  
  103.      EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  104.       Input    to ffffrrrrccccooooddddeeee:
  105.       /usr/src
  106.       /usr/src/cmd/aardvark.c
  107.       /usr/src/cmd/armadillo.c
  108.       /usr/tmp/zoo
  109.  
  110.       Length of the    longest    prefix of the preceding    entry to share:
  111.       0 /usr/src
  112.       8 /cmd/aardvark.c
  113.       14 rmadillo.c
  114.       5 tmp/zoo
  115.  
  116.       Output from ffffrrrrccccooooddddeeee, with trailing nulls changed to newlines
  117.       and count bytes made printable:
  118.       0 LOCATE02
  119.       0 /usr/src
  120.       8 /cmd/aardvark.c
  121.       6 rmadillo.c
  122.       -9 tmp/zoo
  123.  
  124.       (6 = 14 - 8, and -9 =    5 - 14)
  125.  
  126.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  127.  
  128.  
  129.  
  130.      PPPPaaaaggggeeee 2222                         ((((pppprrrriiiinnnntttteeeedddd 5555////11118888////99998888))))
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.      LLLLOOOOCCCCAAAATTTTEEEEDDDDBBBB((((5555LLLL))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          LLLLOOOOCCCCAAAATTTTEEEEDDDDBBBB((((5555LLLL))))
  138.  
  139.  
  140.  
  141.       ffffiiiinnnndddd(1L), llllooooccccaaaatttteeee(1L),    llllooooccccaaaatttteeeeddddbbbb(5L), xxxxaaaarrrrggggssss(1L)    FFFFiiiinnnnddddiiiinnnngggg    FFFFiiiilllleeeessss
  142.       (on-line in Info, or printed)
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.      Page 3                         (printed 5/18/98)
  197.  
  198.  
  199.  
  200.